package com.wang.book.controller;

import com.wang.book.service.BookTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/bookType")
public class BookTypeController {
    @Autowired
    private BookTypeService bookTypeService;

    // 分类删除
    @DeleteMapping("/types/{id}")
    public ResponseEntity<?> deleteType(@PathVariable Integer id) {
        bookTypeService.deleteType(id);
        return ResponseEntity.noContent().build();
    }
}
